package com.yonyougov.devops.cruxcisupport.button;

import com.yonyougov.devops.cruxcisupport.button.vo.ButtonByMenuIdRespVo;
import com.yonyougov.devops.cruxcisupport.button.vo.CurrentUserButtonByMenuCodeDto;
import com.yonyougov.devops.cruxcisupport.button.vo.NoLinkButtonByRoleIdDto;
import com.yonyougov.devops.cruxcisupport.button.vo.NoLinkButtonByRoleIdVo;
import com.yonyougov.devops.fwc.core.entity.Pagination;
import com.yonyougov.devops.fwc.core.service.BaseService;

import java.math.BigInteger;
import java.util.List;

/**
 * t_button服务
 */
public interface ButtonService extends BaseService<ButtonEntity, BigInteger> {
    //<!--用户自定义代码开始-->

    /**
     * 根据角色id获取未被该角色关联的按钮
     *
     * @param noLinkButtonByRoleIdDto
     * @return
     */
    Pagination<NoLinkButtonByRoleIdVo> findNoLinkButtonByRoleId(NoLinkButtonByRoleIdDto noLinkButtonByRoleIdDto);

    /**
     * 根据菜单code获取按钮(权限范围 : 当前用户)
     *
     * @param currentUserButtonByMenuIdDto
     * @return List<ButtonByMenuIdRespVo>
     */
    List<ButtonByMenuIdRespVo> findCurrentUserButtonByMenuCode(CurrentUserButtonByMenuCodeDto currentUserButtonByMenuIdDto);

    /**
     * 删除一个按钮
     *
     * @param buttonId
     */
    void deleteOneButtonByButtonId(BigInteger buttonId);

    //<!--用户自定义代码结束-->
}
